<div class="modal-header" id="scope">
	<h3 class="modal-title" ng-if="param.type == 'insert'">新增</h3>
	<h3 class="modal-title" ng-if="param.type == 'update'">修改</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group" ng-show="param.type=='insert'">
					<label class="col-sm-3 control-label">添加说明：</label>
					<div class="col-sm-5">
						<p>添加线路模版时,会自动生成一个相反路线的模版。</p>
						<p>若无对应的城市或定价模版,点击添加按钮添加即可。</p>
					</div>
				</div>
				<div class="form-group" ng-show="param.type=='insert'">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>起始城市：</label>
					<div class="col-sm-5">
						<ui-select ng-model="city1list.selected" theme="bootstrap">
							<ui-select-match placeholder="起始城市">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="city1 in city1list | propsFilter:{name: $select.search}">
								<span ng-bind-html="city1.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<p>
						<button class="btn m-b-xs btn-sm btn-default btn-addon" type="button" ng-click="addCity()">
							<i class="fa fa-plus"></i> 添加城市</button>
					</p>
				</div>
				<div class="form-group" ng-show="param.type=='update'">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>起始城市：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="起始城市" ng-readonly="param.type=='update'" ng-model="param.data.city1.name" />
					</div>
					<p>不可修改。</p>
				</div>
				<div class="form-group" ng-show="param.type=='insert'">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>目的城市：</label>
					<div class="col-sm-5">
						<ui-select ng-model="city2list.selected" theme="bootstrap">
							<ui-select-match placeholder="目的城市">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="city2 in city2list | propsFilter:{name: $select.search}">
								<span ng-bind-html="city2.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<p>目的城市选择。</p>
				</div>
				<div class="form-group" ng-show="param.type=='update'">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>目的城市：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="目的城市" ng-readonly="param.type=='update'" ng-model="param.data.city2.name" />
					</div>
					<p>不可修改。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>定价模版：</label>
					<div class="col-sm-5">
						<ui-select ng-model="pricelist.selected" theme="bootstrap">
							<ui-select-match placeholder="定价模版">{{$select.selected.code}}</ui-select-match>
							<ui-select-choices repeat="price in pricelist | propsFilter:{code: $select.search}">
								<span ng-bind-html="price.code| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<p ng-show="param.type=='update'">定价模版选择。</p>
					<p ng-show="param.type=='insert'">
						<button class="btn m-b-xs btn-sm btn-default btn-addon" type="button" ng-click="addPrice()">
							<i class="fa fa-plus"></i> 添加模版</button>
					</p>
				</div>
				<div class="form-group" ng-show="param.type=='insert'">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>所属单位：</label>
					<div class="col-sm-5">
						<ui-select ng-model="orglist.selected" theme="bootstrap">
							<ui-select-match placeholder="所属组织">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="org in orglist | propsFilter:{name: $select.search}">
								<span ng-bind-html="org.name | highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
					</div>
					<p>所属的单位选择。</p>
				</div>
				<div class="form-group" ng-show="param.type=='update'">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>所属单位：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="所属单位" readonly="true" ng-model="org.name" />
					</div>
					<p>不可修改。</p>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
		</div>
	</form>
</div>